/**
 * log
 */
export class Log {
  static isPrint = false
  static log = console.log
  static info = console.info
  static debug = console.debug
  static warn = console.warn
  static error = console.error
  static clear = console.clear
  static init(isPrint = false) {
    Log.isPrint = isPrint
    if (isPrint) {
      Log.log = console.log
      Log.info = console.info
      Log.debug = console.debug
      Log.warn = console.warn
      Log.error = console.error
    } else {
      Log.log = Log.emptyFunction
      Log.info = Log.emptyFunction
      Log.debug = Log.emptyFunction
      Log.warn = Log.emptyFunction
      Log.error = Log.emptyFunction
      Log.clear()
    }
  }
  static emptyFunction() {}
}
